#include <stdio.h>
#include <algorithm>
#include <vector>
#include <math.h>
#include <stdlib.h>
#include <string.h>
using namespace std;

#define TRACE(x...) 
#define PRINT(x...) TRACE(printf(x))

#define rep(i,n) for (int i=0; i<n; i++)
#define inter(i,a,b) for (int i=a; i<b; i++)

#define oo 0x3f3f3f3f

#define f first
#define s second
#define mp make_pair

int n, l;
int a[110];
int s; int bestA;

int main() {
	scanf("%d %d", &n, &l);
	rep(i,n) scanf("%d", &a[i]);

	bestA=-1;

	rep(k,101) {
		if (k<l) continue;
		PRINT("For %d pieces:\n", k);
		s=0;

		rep(i,n) s+=(a[i]/k);
		PRINT("Best area: %d\n", s);

		bestA=max(bestA, s*k); 
	}

	printf("%d\n", bestA);

	return 0;
}
